sc.ascfont
Like the FontManager but instead of drawing Bitmap fonts, it draws Outline fonts (eg, TTF, OTF and etc). This means it can draw with rotation, any font scale and etc!
And unlike the FontManager, It also lets you convert colors inside text into actual colors!
Structures
ASCFont
Represents a font and its associated metadata, glyphs, and other properties.
Fields:
metadata
[ ASCFont.Metadata ]glyphs
[ table ] A table mapping glyph names to their corresponding glyph data.- Key [ string ] The glyph name.
- Value [ ASCFont.Glyph ] All glyphs in the font.
ASCFont.Metadata
Metadata related to the font, such as its names, ascender/descender values, and bounding box.
Fields:
names
[ table ] A table containing font names, like "PostScript" or "Full Name".Key
[ string ] The index (eg, fullname)Value
[ string ] The value
ascender
[ number ] The ascender value for the font, which is the height of the highest point of any character.descender
[ number ] The descender value for the font, which is the depth of the lowest point of any character.underLinePosition
[ number ] The vertical position where the underline is drawn.underLineThickness
[ number ] The thickness of the underline.boundingBox
[ ASCFont.BoundingBox ] The overall bounding box for the font, containing the maximum and minimum coordinates.resolution
[ number ] The resolution (typically in DPI) for the font.
ASCFont.BoundingBox
Represents the bounding box for a font, which defines the minimum and maximum x and y coordinates.
Fields:
xMin
[ number ] The minimum x-coordinate of the font's bounding box.xMax
[ number ] The maximum x-coordinate of the font's bounding box.yMin
[ number ] The minimum y-coordinate of the font's bounding box.yMax
[ number ] The maximum y-coordinate of the font's bounding box.